class MSProduct {
  String goodsId;
  String code;
  String icon;
  String type;
  int subType;
  double? discount;
  String? tags;
  double originalPrice;
  double price;
  int exchangeCoin;
  int originalExchangeCoin;
  double originalPriceRupee;
  double priceRupee;
  double localPaymentPriceRupee;
  bool isPromotion;
  int? validity;
  String? validityUnit;
  int localPayOriginalPrice;
  int localPayPrice;
  MSProduct(
      {required this.type,
      required this.code,
      required this.exchangeCoin,
      required this.goodsId,
      required this.icon,
      required this.isPromotion,
      required this.localPaymentPriceRupee,
      required this.localPayOriginalPrice,
      required this.localPayPrice,
      required this.originalExchangeCoin,
      required this.originalPrice,
      required this.originalPriceRupee,
      required this.price,
      required this.priceRupee,
      required this.subType,
      this.tags,
      this.validity,
      this.validityUnit, this.discount});

  factory MSProduct.fromJson(Map<String, dynamic> map) {
    return MSProduct(
        type: map["type"],
        code: map["code"],
        exchangeCoin: map["exchangeCoin"],
        goodsId: map["goodsId"],
        icon: map["icon"],
        isPromotion: map["isPromotion"],
        localPaymentPriceRupee: map["localPaymentPriceRupee"],
        localPayOriginalPrice: map["localPayOriginalPrice"],
        localPayPrice: map["localPayPrice"],
        originalExchangeCoin: map["originalExchangeCoin"],
        originalPrice: map["originalPrice"],
        originalPriceRupee: map["originalPriceRupee"],
        price: map["price"],
        priceRupee: map["priceRupee"],
        subType: map["subType"],
        tags: map["tags"],
        validity: map["validity"],
        validityUnit: map["validityUnit"],
        discount: map["discount"]);
  }
}
